package com.lintf.distributed.transaction.inventory.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lintf.distributed.transaction.inventory.entity.ProcessedMessage;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author lintf
 * @description 针对表【t_processed_message】的数据库操作Service
 * @createDate 2025-06-13 10:42:35
 */
public interface ProcessedMessageService extends IService<ProcessedMessage> {

    boolean isMessageProcessed(String messageId);

    @Transactional(propagation = Propagation.REQUIRES_NEW,rollbackFor = Exception.class)
    boolean markMessageProcessed(String messageId);
}
